<template>
  <transition name="el-zoom-in-center">
    <div class="cu-preview-main records">
      <div class="cu-common-page-header">
        <el-page-header @back="goBack" :content="'跟进记录'" />
      </div>
      <el-col :span="24" style='height: 100%'>
        <custom-table v-loading="loading" :data="list" :hasNO="false">
          <el-table-column prop="followUpDate" label="跟进时间" align="left" :formatter="custom.tableDateFormat" width='120'> </el-table-column>
          <el-table-column prop="followUpDetails" label="跟进详情" align="center"  min-width='220'/>
          <el-table-column prop="followUpMethod" label="维权方式" align="left"  width='120'>
            <template slot-scope="scope">
              {{ scope.row.followUpMethod | dynamicCodeText(followUpMethodOptions) }}
            </template>
          </el-table-column>
          <el-table-column prop="followUpStatus" label="跟进状态" align="left"  width='120'>
            <template slot-scope="scope">
              {{ scope.row.followUpStatus | dynamicCodeText(handlesOptions) }}
            </template>
          </el-table-column>
          <el-table-column prop="createUserName" label="处理人" align="left"  width='120'/>
          <el-table-column prop="attachments" label="附件" align="center"  width="130">
            <template  slot-scope="scope">
              <el-dropdown @command="handleCommandDown" v-if='scope.row.attachments && scope.row.attachments.length > 0'>
                <span class="el-dropdown-link">
                  <el-button type="text">下载</el-button>
                  <i class="el-icon-arrow-down el-icon--right"></i>
                </span>
                <el-dropdown-menu slot="dropdown">
                  <el-dropdown-item v-for="(item, index) in scope.row.attachments"
                                    :key='index'
                                    :command="item.url"
                  >{{item.name}}</el-dropdown-item>
                </el-dropdown-menu>
              </el-dropdown>
            </template>
          </el-table-column>
        </custom-table>
      </el-col>
    </div>
  </transition>
</template>
<script>
export { default } from './index.js'
</script>
<style scoped>
.el-time-spinner__wrapper {
  width: 100% !important;
}
/* @import url(index.scss); */
</style>
